<h1><code ng:non-bindable="">ngKeypress</code>
<span class="hint">(directive in module <code ng:non-bindable="">ng</code>
)</span>
</h1>
<div><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngEventDirs.js" class="improve-docs btn btn-primary">Improve this doc</a><h2 id="Description">Description</h2>
<div class="description"><p>Specify custom behavior on keypress event.</p></div>
<h2 id="Usage">Usage</h2>
<div class="usage">as attribute<pre class="prettyprint linenums">&lt;ANY ng-keypress="{expression}"&gt;
   ...
&lt;/ANY&gt;</pre>
as class<pre class="prettyprint linenums">&lt;ANY class="ng-keypress: {expression};"&gt;
   ...
&lt;/ANY&gt;</pre>
<h4 id="parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>ngKeypress</td><td><a href="" class="label type-hint type-hint-expression">expression</a></td><td><p><a href="guide/expression">Expression</a> to evaluate upon
keypress. (Event object is available as <code>$event</code> and can be interrogated for keyCode, altKey, etc.)</p></td></tr></tbody></table></div>
<h2 id="Example">Example</h2>
<div class="example"><p>See <a href="api/ng.directive:ngClick"><code>ngClick</code></a></p></div>
</div>
